package com.aaa.system.controller;

import com.aaa.entity.User;
import com.aaa.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @program: his-open-parent
 * @description:
 * @author: 闫克起2
 * @create: 2023-03-20 11:03
 **/
@RestController
@RequestMapping("system/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("getByUsername/{username}")
    public User getByUsername(@PathVariable String username){
        return userService.findByUsername(username);
    }

    @PostMapping("/queryUsersNeedScheduling")
    public List<User> queryUsersNeedScheduling(@RequestBody Map<String,Object> map){
        return userService.queryUsersNeedScheduling(map);
    }
}
